/* GUI CONVERTED from rprsiq.p (converter v1.75) Sat Aug 12 23:11:43 2000 */
/* rprsiq.p - RESOURCE INQUIRY                                          */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */
/* web convert rprsiq.p (converter v1.00) Fri Oct 10 13:57:59 1997 */
/* web tag in rprsiq.p (converter v1.00) Mon Oct 06 14:18:39 1997 */
/*F0PN*/ /*K1D7*/ /*                                                    */
/*V8:ConvertMode=Report                                        */
/* REVISION: 1.0     LAST MODIFIED: 05/05/86    BY: pml                 */
/* REVISION: 1.0     LAST MODIFIED: 01/17/86    BY: emb                 */
/* REVISION: 2.0     LAST MODIFIED: 07/09/87    BY: emb *A76*           */
/* REVISION: 4.0     LAST MODIFIED: 12/30/87    BY: wug *A137*          */
/* REVISION: 7.3     LAST MODIFIED: 10/26/92    BY: ram *G237*          */
/*           7.3                    09/10/94    BY: bcm *GM04*          */
/* REVISION: 8.6     LAST MODIFIED: 12/11/97    BY: bvm *K1D7*          */
/* REVISION: 9.1     LAST MODIFIED: 03/24/00    BY: *N08T* Annasaheb Rahane */
/* REVISION: 9.1     LAST MODIFIED: 08/12/00    BY: *N0KP* myb              */

/*K1D7*/ /* DISPLAY TITLE */

/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

/*K1D7*/ {mfdtitle.i "b+ "}

     define variable rsc like rs_rsc.
     define variable site like rs_site.

/*K1D7* /* DISPLAY TITLE */
* {mfdtitle.i "b+ "} */

     site = global_site.

     
/*GUI preprocessor Frame A define */
&SCOPED-DEFINE PP_FRAME_NAME A

FORM /*GUI*/ 
/*GM04*/    
 RECT-FRAME       AT ROW 1 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1 COLUMN 3 NO-LABEL VIEW-AS TEXT SIZE-PIXELS 1 BY 1
 SKIP(.1)  /*GUI*/
space(1)
        rsc
        rs_desc        no-label
        site
     with frame a side-labels width 80 attr-space NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-a-title AS CHARACTER INITIAL "".
 RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
 RECT-FRAME-LABEL:HIDDEN in frame a = yes.
 RECT-FRAME:HEIGHT-PIXELS in frame a =
  FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME a = FRAME a:WIDTH-CHARS - .5.  /*GUI*/

/*GUI preprocessor Frame A undefine */
&UNDEFINE PP_FRAME_NAME



     /* SET EXTERNAL LABELS */
     setFrameLabels(frame a:handle).

/*K1D7*/ {wbrp01.i}

        repeat with frame a:

/*K1D7*/   if c-application-mode <> 'web' then
           set rsc site editing:

           if frame-field = "rsc" then do with frame a:
          /* FIND NEXT/PREVIOUS RECORD */
          {mfnp.i rs_mstr rsc rs_rsc rsc rs_rsc rs_rsc}
          if recno <> ? then display rs_rsc @ rsc rs_desc.
           end.
           else do with frame a:
          /* FIND NEXT/PREVIOUS RECORD */
          {mfnp.i si_mstr site si_site site si_site si_site}
          if recno <> ? then display si_site @ site.
           end.
        end.

/*K1D7*/ {wbrp06.i &command = set &fields = "  rsc site" &frm = "a"}

/*K1D7*/ if (c-application-mode <> 'web') or
/*K1D7*/ (c-application-mode = 'web' and
/*K1D7*/ (c-web-request begins 'data')) then do:

        find rs_mstr where rs_site = site and rs_rsc = rsc no-lock no-error.
        if available rs_mstr then display rs_rsc @ rsc rs_desc.
        else display "" @ rs_desc.

        hide frame b.

/*K1D7*/ end.

        /* SELECT PRINTER */
           {mfselprt.i "terminal" 80}
/*GUI*/ RECT-FRAME:HEIGHT-PIXELS in frame a = FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.


        for each rs_mstr no-lock where rs_rsc >= rsc
        and (rs_site = site)
        by rs_rsc by rs_site with frame b width 80 no-attr-space:

           /* SET EXTERNAL LABELS */
           setFrameLabels(frame b:handle).
           display rs_rsc rs_desc rs_um WITH STREAM-IO /*GUI*/ .

           for each rsd_det where rsd_rsc = rs_rsc
           and rsd_site = rs_site
           no-lock by rsd_rsc by rsd_site by rsd_ref by rsd_start
          with frame b:
          display rsd_ref rsd_cap rsd_start rsd_end WITH STREAM-IO /*GUI*/ .
          down 1.
           end.
/*G237*/       
/*GUI*/ {mfguirex.i  "false"} /*Replace mfrpexit*/

        end.
        {mfreset.i}
/*GUI*/ {mfgrptrm.i} /*Report-to-Window*/

        {mfmsg.i 8 1}
     end.
/*K1D7*/ {wbrp04.i &frame-spec = a}
